perm filename ROMAND.BAK[CM,DEK] blob sn#791389 filedate 1985-05-18 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00012 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	% Computer Modern Roman digits:
C00003 00003	cmchar "The numeral 0"
C00004 00004	cmchar "The numeral 1"
C00006 00005	cmchar "The numeral 2"
C00009 00006	cmchar "The numeral 3"
C00012 00007	cmchar "The numeral 4"
C00015 00008	cmchar "The numeral 5"
C00019 00009	cmchar "The numeral 6"
C00022 00010	cmchar "The numeral 7"
C00025 00011	cmchar "The numeral 8"
C00029 00012	cmchar "The numeral 9"
C00032 ENDMK
CāŠ—;
% Computer Modern Roman digits:
% This file contains the ten digits in so-called roman style.
% Character codes \0060 through \0071 are generated.

% All digits have the same height, width, depth, and italic correction.
cmchar "The numeral 0";
beginchar("0",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric med_curve; med_curve=round(1/3[curve,cap_curve]);
penpos1(vair,90); penpos3(vair,-90);
penpos2(med_curve,180); penpos4(med_curve,0);
if not monospace: interim superness:=sqrt(more_super*hein_super); fi
x2r=round max(.7u,1.45u-.5med_curve);
x4r=w-x2r; x1=x3=.5w; y1r=h+o; y2=y4=.5h-vair_corr; y3r=-o;
penstroke pulled_super_arc.e(1,2)(superpull)
 & pulled_super_arc.e(2,3)(superpull)
 & pulled_super_arc.e(3,4)(superpull)
 & pulled_super_arc.e(4,1)(superpull) & cycle;	% bowl
penlabels(1,2,3,4); endchar;
cmchar "The numeral 1";
beginchar("1",9u#,fig_height#,0); less_rounded;
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric reduced_stem; reduced_stem=round(.4[stem',cap_stem']);
pickup tiny.nib;
penpos1(reduced_stem-tiny,0); penpos2(reduced_stem-tiny,0);
lft x1l=lft x2l=round(.5(w+.5u)-.5cap_stem'); top y1=h+apex_o; bot y2=0;
filldraw stroke z1e..z2e;	% stem
cup_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u),
  b,1/3,min(2.25u,w-1.25u-rt x2r)); % serif
pickup crisp.nib; penpos3(slab-crisp,-90); penpos4(cap_bar-crisp,-90);
top y3l=h+apex_o; top y4l=if monospace: .8 else: .9 fi h+apex_o;
lft x4=max(1.25u,tiny.lft x1l-2.35u);
tiny.rt x1r=lft x3+.25[tiny,hair];
erase fill z3l...z4l{left}
 --(x4l,h+apex_o+1)--(x3l,h+apex_o+1)--cycle; % erase excess at top
filldraw stroke z3e..z4e{left};	% point
penlabels(1,2,3,4); endchar;
cmchar "The numeral 2";
beginchar("2",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric arm_thickness, hair_vair; hair_vair=.25[vair,hair];
arm_thickness=if hefty: round(slab+2stem_corr) else: cap_stem fi;
pickup crisp.nib; penpos7(arm_thickness-crisp,-90); penpos8(hair-crisp,0);
bot y7r=0; lft x7=round .9u; rt x8r=round(w-.9u); y8=good.y(y7l+beak/2);
arm(7,8,a,.3beak_darkness,beak_jut);	% arm and beak
pickup fine.nib; penpos2(slab-fine,90); penpos3(cap_curve-fine,0);
top y2r=h+o; x2=.5(w-.5u); rt x3r=round(w-.9u); y3=.75h;
if serifs: numeric bulb_diam; bulb_diam=round(flare+2/3(cap_stem-stem));
 penpos0(bulb_diam-fine,180); penpos1(cap_hair-fine,180);
 lft x1r=round .9u; y1-.5bulb_diam=2/3h;
 (x,y2l)=whatever[z1l,z2r]; x2l:=x; bulb(2,1,0);	% bulb and arc
else: x2l:=x2l-.25u; penpos1(flare-fine,angle(-9u,h));
 lft x1r=round .75u; bot y1l=round .7h; y1r:=good.y y1r; x1l:=good.x x1l;
 filldraw stroke z1e{curl.5}...{right}z2e; fi	% terminal and arc
penpos4(.25[hair_vair,cap_stem]-fine,0);
penpos5(hair_vair-fine,0); penpos6(hair_vair-fine,0);
y5=arm_thickness; y4=.3[y5,y3]; top y6=min(y5,slab,top y7l);
lft x6l=crisp.lft x7; z4l=whatever[z6l,(x3l,bot .58h)]; z5l=whatever[z6l,z4l];
erase fill z4l--z6l--lft z6l--(lft x6l,y4l)--cycle;	% erase excess at left
filldraw stroke z2e{right}..tension atleast .9 and atleast 1
 ..z3e{down}.. z4e---z5e--z6e;	% stroke
penlabels(0,1,2,3,4,5,6,7,8); endchar;
cmchar "The numeral 3";
beginchar("3",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric top_thickness,mid_thickness,bot_thickness;
top_thickness=max(fine.breadth,round(slab-2vair_corr));
mid_thickness=max(fine.breadth,round 2/3vair);
bot_thickness=max(fine.breadth,round(slab-vair_corr));
pickup fine.nib; penpos2(top_thickness-fine,90); top y2r=h+o;
penpos3(.6[curve,cap_curve]-stem_corr-fine,0); rt x3r=round(w-1.25u);
penpos4(vair-fine,-90); penpos5(vair-fine,-90);
penpos6(mid_thickness-fine,90); x2=x6=x8=.5[1.5u,x7];
penpos7(cap_curve-fine,0); rt x7r=round(w-.75u); lft x5=min(round 3u,lft x6);
penpos8(bot_thickness-fine,-90); bot y8r=-o;
y3=.6[top y4l,bot y2l]; y7=.5[bot y6l,top y8l];
top y5l=round(.54h+.5vair); y5r=y6l; x4=1/3[x5,x3l]; z4=z5+whatever*(150u,h);
filldraw stroke pulled_super_arc.e(2,3)(.5superpull)
 & z3e{down}...z4e---z5e;	% upper bowl
filldraw z5r--z6l--z6r--z5l---cycle;	% middle tip
filldraw stroke pulled_super_arc.e(6,7)(.5superpull)
 & pulled_super_arc.e(7,8)(.5superpull);	% lower bowl
if serifs: numeric bulb_diam[];
 bulb_diam1=flare+.5(cap_stem-stem); bulb_diam2=flare+cap_stem-stem;
 penpos0(bulb_diam1-fine,180); penpos1(hair-fine,180);
 lft x0r=round 1.25u; y0=min(.9h-.5bulb_diam1,.75h+.5bulb_diam1);
 bulb(2,1,0);	% upper bulb
 penpos10(bulb_diam2-fine,-180); penpos9(cap_hair-fine,-180);
 lft x10r=round .75u; y10=max(.1h+.5bulb_diam2,.3h-.5bulb_diam2);
 bulb(8,9,10);	% lower bulb
else: penpos1(.5[vair,flare]-fine,angle(-8u,h));
 lft x1r=round u; bot y1l=round .75h+o; y1r:=good.y y1r; x1l:=good.x x1l;
 penpos9(bot_thickness-fine,angle(-2u,-h));
 lft x9r=round .75u; top y9l=round .25h-o; y9r:=good.y y9r; x9l:=good.x x9l;
 filldraw stroke z2e{left}...z1e;	% upper terminal
 filldraw stroke z8e{left}...z9e; fi	% lower terminal
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
cmchar "The numeral 4";
beginchar("4",9u#,fig_height#,0); less_rounded;
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric reduced_stem, reduced_stem', diag_stem, alpha, cut; cut=.75notch_cut;
reduced_stem=round(.4[fudged.stem,fudged.cap_stem]);
reduced_stem'=round max(tiny.breadth,reduced_stem-2stem_corr);
diag_stem=round max(tiny.breadth,.7[vair,fudged.hair]);
pickup crisp.nib; penpos5(cap_bar-crisp,90); penpos6(cap_bar-crisp,90);
lft x5=round .5u; rt x6=round(w-.5u);
y5r=good.y(if serifs: 5/6[slab,bar_height] else: 5/6 bar_height fi);
z4l=top lft z5r; y2=y2'=y5=y6; x1r=x2r=round(w-3u+.5reduced_stem);
penpos1(reduced_stem',0); penpos2(reduced_stem',0); y1=y3=h+apex_o;
x3r+apex_corr=x1r; alpha=diag_ratio(1,diag_stem,y3-y4l,x3r-x4l);
penpos3(alpha*diag_stem,0); penpos4(alpha*diag_stem,0);
x0=x1l; z0=whatever[z3r,z4r];
x5'=x5; z5''=z5'+penoffset z4-z3 of currentpen=whatever[z4l,z3l];
fill diag_end(2r,1r,1,.5,3l,4l)---z5''...lft z5'
 ---lft z5l -- (x4r,y5l) -- z4r
 if y0<h-cut:{z3r-z4r}...{up}(x1l-1,h-cut)
  --(x1l,h-cut) else: -- z0 fi
 --z2l--z2r--cycle;	% diagonal and upper stem
filldraw stroke z5e..z6e;	% bar
pickup tiny.nib; penpos7(reduced_stem-tiny,0); rt x7r=x1r; bot y7=0;
penpos2'(reduced_stem-tiny,0); x2'=x7;
filldraw stroke z2'e..z7e;	% lower stem
if serifs: cup_serif(7,2',a,1/3,1.75u,
  b,1/3,min(1.75u,w-.5u-rt x7r)); fi	% serif
penlabels(0,1,2,3,4,5,6,7); endchar;
cmchar "The numeral 5";
beginchar("5",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric bot_thickness,reduced_hair;
bot_thickness=max(fine.breadth,round(slab-vair_corr));
reduced_hair=round(cap_hair if hefty: -2stem_corr fi);
pickup tiny.nib; penpos5(vair-tiny,180); penpos6(vair-tiny,90);
top y5=round .5h+o; top y6r=round .61803h+o;
penpos3(reduced_hair-tiny,0); penpos4(reduced_hair-tiny,0);
lft x3l=max(1.35u,2.1u-.5reduced_hair); x3=x4=x5; y4=y5;
top y3=h if not hefty: +o fi;
filldraw stroke z3e..z4e;	% thin stem
penpos7(cap_stem-fine,0); penpos8(bot_thickness-fine,-90);
fine.rt x7r=round(w-.9u); x8=.5[u,x7]; x6=.5[x5,x7];
erase fill z5--bot z5--(x6,bot y5)--z6{left}
 ..tension .9 and 1..{curl 1.5}cycle; % erase excess in middle
filldraw stroke z6e{left}..tension .9 and 1..{curl 1.5}z5e;	% link
pickup fine.nib; penpos6'(vair-fine,90); z6'=z6;
y7=.5[y6,y8]; bot y8r=-o;
filldraw stroke pulled_super_arc.e(6',7)(superpull)
 & pulled_super_arc.e(7,8)(superpull);	% bowl
if serifs: penpos9(hair-fine,-180); y9=.5y5; lft x9r=round .9u;
 penpos10(flare+1/3(cap_stem-stem)-fine,-180); bulb(8,9,10);	% bulb
else: penpos9(3/7[bot_thickness,flare]-fine,angle(-7u,-h));
 lft x9r=round .9u; bot y9r=round .1h-o; x9l:=good.x x9l; y9l:=good.y y9l;
 filldraw stroke z8e{left}..z9e; fi	% terminal
if hefty: pickup crisp.nib; penpos1(slab-crisp,0); penpos2(hair-crisp,0);
 top y1r=h; x1=x4; rt x2r=round(w-1.5u); y2=y1l; arm(1,2,a,0,0);	% arm
else: numeric flag_breadth; flag_breadth=7/8[vair,cap_curve];
 penpos1(flag_breadth-fine,90); penpos2(flag_breadth-fine,60);
 penpos0(vair-fine,90); top y1r=tiny.top y3; top y2r=round .95h+o; y0r=y1r;
 lft x1=tiny.lft x3l; x2r=.5[x1,x0]; rt x0=round(w-1.6u);
 erase fill top z1r--z1r...{right}z2r
  --(x2r,top y1r)--cycle; % erase excess at top
 filldraw stroke z1e...{right}z2e...z0e; fi	% flag
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
cmchar "The numeral 6";
beginchar("6",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric top_thickness,bot_thickness,side_thickness,pull;
top_thickness=max(fine.breadth,round(slab-2vair_corr));
bot_thickness=max(fine.breadth,round(slab-vair_corr));
side_thickness=max(fine.breadth,round(1/3[curve,cap_curve]));
pull=min(.25,1.5superpull);
pickup fine.nib; penpos2(top_thickness-fine,-270);
penpos3(side_thickness-fine,-180); penpos4(bot_thickness-fine,-90);
penpos5(side_thickness-fine,0); penpos6(vair-fine,90);
lft x3r=w-rt x5r=round max(.75u,1.5u-.5side_thickness); x4=x6-.1u=x2-.35u=.5w;
top y2r=h+o; y3=.5[y2,y4]; bot y4r=-o; y5=.5[y4,y6]; top y6=round 5/8h+o;
path p; p=pulled_super_arc.l(3,4)(pull);
numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5)));
penpos7(thin_join-fine,180); z7l=point t of p;
(x,y6r)=whatever[z7l,z6l]; x6r:=x;
filldraw stroke pulled_super_arc.e(2,3)(pull)
 & pulled_super_arc.e(3,4)(pull)
 & {{save ...; let ... = ....;
     pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}}
 & z6e{left}...{direction t of p}z7e;	% arc and bowl
if serifs: penpos1(hair-fine,-360); penpos0(flare-fine,-360);
 rt x0r=round(w-1.6u); y0=round min(.9h-.5flare,.8h+.5flare)+o;
 {{save ...; let ... = ....; bulb(2,1,0)}};	% arc and bulb
else: penpos1(round(.1[top_thickness,flare])-fine,90);
 top y1r=round .97h+o; rt x1=round(x5-.5);
 filldraw stroke z2e{right}..tension .9 and 1..z1e; fi	% terminal
penlabels(0,1,2,3,4,5,6,7); endchar;
cmchar "The numeral 7";
beginchar("7",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric arm_thickness, bot_width, top_shift, top_hair;
if hefty: arm_thickness=round(slab+2stem_corr); top_shift=0;
 bot_width=round(.51[curve,cap_curve]); top_hair=.4[thin_join,bot_width];
else: arm_thickness=cap_stem; top_shift=.5u;
 bot_width=flare; top_hair=cap_hair; fi
if top_hair<tiny.breadth: top_hair:=tiny.breadth; fi
pickup crisp.nib; penpos2(arm_thickness-crisp,90); penpos1(hair-crisp,180);
top y2r=h; rt x2=round(w-.75u+top_shift); lft x1r=round(.75u+.5top_shift);
y1=good.y(y2l-beak/2); arm(2,1,a,.3beak_darkness,-beak_jut);	% arm and beak
penpos3(hair-crisp,180); y3=good.y(y2r+beak/6); z3r=whatever[z1r,z.a0];
penpos2'(2epsilon,-90); z2'=z2r;
arm(2',3,b,beak_darkness,x3r-x.a0);	% upward extension of beak
pickup tiny.nib; penpos4(top_hair-tiny,0); penpos6(bot_width-tiny,0);
bot y4=max(h-arm_thickness,h-slab,bot y2l); rt x4r=crisp.rt x2;
lft x6l=round(3.5u+top_shift-.5bot_width);
if serifs: y6-.5bot_width=-o; filldraw z6l{down}..{up}z6r--cycle;	% bulb
else: bot y6=-oo; fi
if hefty: erase fill rt z4r--z4r...{down}z6r
  --(rt x4r,y6)--cycle;	% erase excess at top
 filldraw stroke z4e...{down}z6e;	% stroke
else: penpos5(top_hair-tiny,0); y5=2/3h; z5=whatever[z4,(.75u,y6)];
 erase fill rt z4r--z4r--z5r--(rt x4r,y5)--cycle;	% erase excess at top
 filldraw stroke z4e---z5e...{down}z6e; fi	% stroke
penlabels(1,2,3,4,5,6); endchar;
cmchar "The numeral 8";
beginchar("8",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric top_thickness,mid_thickness,bot_thickness,upper_side,lower_side,theta;
top_thickness=max(fine.breadth,round(slab-2vair_corr));
bot_thickness=max(fine.breadth,round(slab-vair_corr));
x0=.5w; y0=.54h;
if hefty: mid_thickness=round 2/3vair; upper_side=round(stem-3stem_corr);
 lower_side=round min(.5[curve,cap_curve]-stem_corr,upper_side+.25u);
 penpos1(top_thickness,90); penpos2(upper_side,180);
 penpos3(mid_thickness,270); penpos8(upper_side,360);
 penpos4(mid_thickness,90); penpos7(lower_side,180);
 penpos6(bot_thickness,270); penpos5(lower_side,360);
 penpos0(vair,90); z3l=z0r; z4l=z0l;
 x1=x6=.5w; x2r=w-x8r=round u; x7r=w-x5r=round .75u;
 top y1r=h+o; bot y6r=-o; y2=y8=.5[y1l,y3l]; y7=y5=.5[y4l,y6l];
 filldraw stroke pulled_super_arc.e(1,2)(superpull)
  & pulled_super_arc.e(2,3)(superpull);	% left half of upper bowl
 filldraw stroke pulled_super_arc.e(4,5)(superpull)
  & pulled_super_arc.e(5,6)(superpull);	% right half of lower bowl
 filldraw stroke pulled_super_arc.e(6,7)(superpull)
  & pulled_super_arc.e(7,4)(superpull);	% left half of lower bowl
 filldraw stroke pulled_super_arc.e(3,8)(superpull)
  & pulled_super_arc.e(8,1)(superpull);	% right half of upper bowl
else: pickup fine.nib; theta=90-angle(18u,h); slope:=-h/18u;
 upper_side=max(fine.breadth,round(.5[hair,stem]-stem_corr));
 lower_side=round(.5[hair,stem]+stem_corr);
 penpos1(top_thickness-fine,-90); penpos6(bot_thickness-fine,-90);
 x1=x6=.5w; top y1l=h+o; bot y6r=-o; penpos0(cap_stem-fine,theta);
 lft x2l=w-rt x8l=round 1.25u; lft x7r=w-rt x5r=round .75u;
 x2r-x2l=upper_side-fine; x5r-x5l=lower_side-fine;
 ellipse_set(1l,2l,3l,0l); ellipse_set(1r,2r,3r,0r);
 ellipse_set(6l,5l,4l,0l); ellipse_set(6r,5r,4r,0r);
 numeric tau; tau=max(.8,.20710678/(superness-.5));
 filldraw stroke z1e{left}..tension atleast tau..z2e{down}
  ..z3e---z4e..z5e{down}..tension atleast tau..z6e{left};	% S stroke
 penpos7(lower_side-fine,180); penpos8(upper_side-fine,180);
 y7=.5[y5l,y5r]; y8=.5[y2l,y2r]; penpos9(vair-fine,90); z9=z0;
 filldraw stroke z1e{right}..tension atleast tau..z8e{down}
  ..tension atleast tau and atleast 1..{-18u,-.618h}z9e; % upper right stroke
 filldraw stroke z6e{left}..tension atleast tau..z7e{up}
  ..tension atleast tau and atleast 1..{18u,.5h}z9e; fi % lower left stroke
penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
cmchar "The numeral 9";
beginchar("9",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric top_thickness,bot_thickness,side_thickness,pull;
top_thickness=max(fine.breadth,round(slab-2vair_corr));
bot_thickness=max(fine.breadth,round(slab-vair_corr));
side_thickness=max(fine.breadth,round(1/3[curve,cap_curve]));
pull=min(.25,1.5superpull);
pickup fine.nib; penpos2(bot_thickness-fine,-90);
penpos3(side_thickness-fine,0); penpos4(top_thickness-fine,90);
penpos5(side_thickness-fine,180); penpos6(vair-fine,270);
w-rt x3r=lft x5r=round max(.75u,1.5u-.5side_thickness);
x4-.1u=x6+.1u=x2+.35u=.5w;
bot y2r=-o; y3=.5[y2,y4]; top y4r=h+o; y5=.5[y4,y6]; bot y6=round 3/8h-o;
path p; p=pulled_super_arc.l(3,4)(pull);
numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5)));
penpos7(thin_join-fine,360); z7l=point t of p;
(x,y6r)=whatever[z7l,z6l]; x6r:=x;
filldraw stroke pulled_super_arc.e(2,3)(pull)
 & pulled_super_arc.e(3,4)(pull)
 & {{save ...; let ... = ....;
     pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}}
 & z6e{right}...{direction t of p}z7e;	% arc and bowl
if serifs: penpos1(hair-fine,-180); penpos0(flare-fine,-180);
 lft x0r=round 1.6u; y0=round max(.1h+.5flare,.2h-.5flare)-o;
 {{save ...; let ... = ....; bulb(2,1,0)}};	% arc and bulb
else: penpos1(round(.1[bot_thickness,flare])-fine,-120);
 bot y1r=round .07h-o; lft x1r=round 1.3u;
 filldraw stroke z2e{left}..tension .9 and 1..z1e; fi	% terminal
penlabels(0,1,2,3,4,5,6,7); endchar;